- /* getdbl.cpp by K.Tsuru */
- /****************
- double type
- skip ' ' and ','
- *****************/
- #include "getnum.h"
- #include <string>
- using namespace std;
- double GetDouble(){
- string buff;
- char c;
- while(1) {
- if((c = getchar())== '\n') break;
- if(c==' '||c==',') continue;
- buff.append(1, c);
- }
- return atof(buff.c_str());
- }